<!DOCTYPE html>
<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title></title>
  <link href="/wenda/styles/base.css" rel="stylesheet" type="text/css">
  <link href="/wenda/styles/public.css" rel="stylesheet" type="text/css">
  <link href="/wenda/js/ueditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
  <link href="/wenda/js/datepicker/datepicker.css" rel="stylesheet">

    <link href="/wenda/styles/invite_user.css" rel="stylesheet" type="text/css">
    <link href="/wenda/styles/mfw-footer.css" rel="stylesheet" type="text/css">
    <link href="/wenda/styles/mfw-toolbar.css" rel="stylesheet" type="text/css">

  <script type="text/javascript" src="/wenda/js/jquery.js"></script>
  <script type="text/javascript" charset="utf-8" src="/wenda/js/ueditor/umeditor.config.js"></script>
  <script type="text/javascript" src="/wenda/js/common.js"></script>
  <script type="text/javascript" src="/wenda/js/public.js"></script>

    <link href="/styles/addtravelnote.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" charset="utf-8" src="/js/ueditor/umeditor.min.js"></script>
    <script type="text/javascript" src="/js/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script src="/js/plugins/datepicker/datepicker.js"></script>

    <link href="/js/plugins/chosen/chosen.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/plugins/chosen/chosen.jquery.js"></script>
    <script type="text/javascript" src="/js/system/addtravelnote.js"></script>

    <script type="text/javascript" src="/js/wenda_publish.js"></script>

    <script type="text/javascript" src="/js/system/travelnotedetail.js"></script>
    <script src="/js/plugins/jquery-form/jquery.form.js"></script>

    <script type="text/javascript" src="/js/system/emoji.js"></script>

    <script type="text/javascript" src="/js/system/common.js"></script>



    <script>

        $(function () {
            $("._j_publish").click(function () {
                var content = $("._j_title").val();
                if (!content) {
                        popup("标题内容必填");

                    return;
                }

                var labels = [];
                $('.pi-tagitem span').each(function (index, value) {
                    labels.push($(value).text());
                })

                $("#tagInput").val(labels.join(","))

                $("#questionForm").ajaxSubmit(function () {
                    window.location.href="/ask"
                })
            })


        })


    </script>




</head>

<body>
  <div class="lww_header">
    <div class="header_wrap">
      <div class="header_logo">
        <a href="javascript:;" class="lww_logo"></a>
      </div>
      <ul class="header_nav">
        <li><a href="/">首页</a></li>
        <li><a href="/destination">目的地</a></li>
        <li><a href="/travel">旅游攻略</a></li>
        <#--<li><a href="javascript:;">去旅行<i class="icon_caret_down"></i></a></li>-->
        <li><a href="/travel">游记</a></li>
        <li><a href="/hotel">酒店</a></li>
        <li><a href="/ask">社区<i class="icon_caret_down"></i></a></li>
      </ul>
      <div class="header_search">
        <input type="text" />
        <a class="icon_search"></a>
      </div>
      <div class="login_info">
        <div class="head_user">
          <a href="/mine/home">
            <img src="${(user.headImgUrl)!}" />
            <i class="icon_caret_down"></i>
          </a>
        </div>
        <div class="header_msg">
          消息<i class="icon_caret_down"></i>
        </div>
        <div class="header_daka">
          <a href="javascript:;">打卡</a>
        </div>
      </div>
    </div>
    <div class="shadow"></div>
  </div>
  <!--文件上传-->
  <form action="/coverImageUpload" method="post" id="coverForm">
      <input type="file" name="pic" id="coverBtn" style="display: none;">
  </form>


  <div class="wrapper">
    <div class="qt-container clearfix">
      <div class="qt-main">
        <div class="crumb">
          <a href="/ask/">旅游问答</a> &gt; <span>我要提问</span>
        </div>
            <form action="/ask/askPublish" method="post" id="questionForm">
                <div class="qt-tit">
                  <h5>问题标题</h5>
                  <div class="qt-con">
                    <input type="text" name="title" placeholder="标题不小于10字哦" class="_j_title">
                    <span class="count"><span class="_j_title_num">0</span>/80 字</span>
                    <span class="_j_min_num hide">10</span>
                    <span class="error err-tips _j_title_error">标题不能少于10字</span>
                  </div>
                </div>
                  <div class="qt-tit">
                    <h5>目的地选择</h5>
                  <div class="qt-con">
                      <select name="destId.id" data-placeholder="请选择目的地" id="region"   class="form-control"   style="width:655px;height:40px;">
                        <#list dests as r>
                            <option class="pi-addTag" value="${r.id!}">${r.name!}</option>
                        </#list>
                      </select>

                  </div>
                  </div>
                    <br/>
                  <dl>
                      <div class="pi-tags">
                          <label>兴趣标签</label>
                          <div class="pi-addTag"> <span class="added _j_added"></span> <input class="pi-addinput"
                                                                                              type="text"  placeholder="添加兴趣标签，手动输入的标签使用回车键分隔">
                          </div>
                          <input type="hidden" id="tagInput" name="tags">
                          <script>
                              <#if tag??>
                                  <#list tag as t>
                                            $('._j_added').append('<a class="pi-tagitem" role="button"><span>${t.tags}</span><i class="rm_tag">×</i></a>');
                                  </#list>
                              </#if>
                          </script>
                      </div>
                  </dl>


                <div class="qt-details">
                  <h5><a title="添加问答内容" class="icon active" id="_j_show_content"></a>问题详细内容</h5>
                    <dl class="body cf">
                        <dd id="content_div">
                            <script id="editor" name="content" type="text/plain" style="width:100%;height:500px;"></script>
                        </dd>
                     </dl>
                </div>
                <div class="publish_question">
                  <a class="qt-post-btn _j_publish" title="发布问题">发布问题</a>
                </div>
            </form>
      </div>
      <div class="qt-sider">
        <div class="qts-tit">提问的正确姿势</div>
        <div class="qts-con">
          <p>1.问题要【具体】【真实】【诚恳】，问题较多，需全面阐述时，可以添加问题补充。结伴/交易/与旅行无关的提问将被删除。</p>
          <p>2.给问题添加目的地，并打上正确的标签将有助于更快地获得回答。</p>
        </div>
      </div>
    </div>
  </div>
</body>

</html>